package com.wjb.xietong.server.topic;

import java.util.HashMap;
import java.util.Map;

import com.wjb.xietong.server.IRequestParam;
import com.wjb.xietong.util.IDs;

public class TopicParam implements IRequestParam {
	/** (0:全部 1:报告 2:我发送的 3:回复我的 4:我回复的) **/
	private int type = 0;
	private long userId = 0l;
	private long companyId = 0l;
	private int pageNo = 0;// 起始记录
	private int pageSize = 0;// 结束记录

	@Override
	public Map<String, String> parseData2Map() {
		Map<String, String> map = new HashMap<String, String>();
		put(map, IDs.M, IDs.MOBILE_TOPIC);
		put(map, IDs.TYPE, getType());
		put(map, IDs.USER_ID, getUserId());
		put(map, IDs.COM_ID, getCompanyId());
		put(map, IDs.PAGE_NO, getPageNo());
		put(map, IDs.PAGE_SIZE, getPageSize());
		return map;
	}
	
	private void put(Map<String, String> map, String key, long value) {
		put(map, key, String.valueOf(value));
	}

	private void put(Map<String, String> map, String key, int value) {
		put(map, key, String.valueOf(value));
	}

	private void put(Map<String, String> map, String key, String value) {
		if (null == key || null == value) {
			return;
		}
		map.put(key, value);
	}

	public int getType() {
		return type;
	}

	/** (0:全部 1:报告 2:我发送的 3:回复我的 4:我回复的) **/
	public void setType(int type) {
		this.type = type;
	}

	public long getUserId() {
		return userId;
	}

	public void setUserId(long userId) {
		this.userId = userId;
	}

	public long getCompanyId() {
		return companyId;
	}

	public void setCompanyId(long companyId) {
		this.companyId = companyId;
	}

	public int getPageNo() {
		return pageNo;
	}

	public void setPageNo(int pageNo) {
		this.pageNo = pageNo;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

}
